var firstUniqChar = function(s) {
    const fr=_.countBy(s)
    for (const [i,ch] of Array.from(s).entries()) {
        if(fr[ch]==1){
            return i
        }
    }
    return -1
};